Optimal. Leaf size=46 \[ \frac{a^2 \log (\sin (c+d x))}{d}+\frac{2 a b \sin (c+d x)}{d}+\frac{b^2 \sin ^2(c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.038808, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {2721, 43} \[ \frac{a^2 \log (\sin (c+d x))}{d}+\frac{2 a b \sin (c+d x)}{d}+\frac{b^2 \sin ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2721
Rule 43
Rubi steps
\begin{align*} \int \cot (c+d x) (a+b \sin (c+d x))^2 \, dx &=\frac{\operatorname{Subst}\left (\int \frac{(a+x)^2}{x} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \left (2 a+\frac{a^2}{x}+x\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac{a^2 \log (\sin (c+d x))}{d}+\frac{2 a b \sin (c+d x)}{d}+\frac{b^2 \sin ^2(c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.0234396, size = 46, normalized size = 1. \[ \frac{a^2 \log (\sin (c+d x))}{d}+\frac{2 a b \sin (c+d x)}{d}+\frac{b^2 \sin ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.023, size = 45, normalized size = 1. \begin{align*}{\frac{{a}^{2}\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}}+2\,{\frac{ab\sin \left ( dx+c \right ) }{d}}+{\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{2}{b}^{2}}{2\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.89331, size = 54, normalized size = 1.17 \begin{align*} \frac{b^{2} \sin \left (d x + c\right )^{2} + 2 \, a^{2} \log \left (\sin \left (d x + c\right )\right ) + 4 \, a b \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.57997, size = 108, normalized size = 2.35 \begin{align*} -\frac{b^{2} \cos \left (d x + c\right )^{2} - 2 \, a^{2} \log \left (\frac{1}{2} \, \sin \left (d x + c\right )\right ) - 4 \, a b \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sin{\left (c + d x \right )}\right )^{2} \cot{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 2.32155, size = 55, normalized size = 1.2 \begin{align*} \frac{b^{2} \sin \left (d x + c\right )^{2} + 2 \, a^{2} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) + 4 \, a b \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]